<!--
 * @Author: your name
 * @Date: 2021-10-27 16:26:20
 * @LastEditTime: 2021-10-28 14:31:34
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue-admin-template\src\views\register\register.vue
-->
<template>
<div class="register">
  <el-form ref="form" :model="form" label-width="80px" size="mini" align="center">
  <el-form-item label="手机号" >
    <el-input v-model="form.account" ></el-input>
  </el-form-item>
   <el-form-item label="密码">
    <el-input v-model="form.password" show-password></el-input>
  </el-form-item>
  <el-button type="primary"
  style="width:50%;margin-bottom:30px;margin-left:35px;"
   @click="toRegister()"
   >注册</el-button>
    </el-form>
    
</div>

</template>


<script>

    export default {
      methods:{
  toRegister(){
    let{account,password} = this.form;
      this.$http({
        methond:'post',
        url:'/register',
        data:{username:account,userpass:password}
      }).then(res=>{
        
      })
  }
},
    data() {
      return {
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        }
      }
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      }
    }
  }
</script>

<style lang="scss">
body{
  display: flex;
  justify-content: center;
  align-content: center;
  height: 800px;
}
.register{
  // width: 800px;
}
</style>